//
//  MineInfoAvatorCell.m
//  copyrightTrading
//
//  Created by 郭子一 on 2020/10/7.
//  Copyright © 2020 郭子一. All rights reserved.
//

#import "MineInfoAvatorCell.h"

@implementation MineInfoAvatorCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI
{
    self.titleLabel = [UILabel new];
    self.titleLabel.font = JSS_MEDIUM_FONT_4;
    [self.contentView addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(20);
        make.centerY.offset(0);
        make.width.mas_equalTo(110);
        make.height.mas_equalTo(20);
    }];
    
    self.avatorImg = [[UIImageView alloc] init];
    self.avatorImg.image = [UIImage imageNamed:@"MineHeaderImg"];
    self.avatorImg.layer.masksToBounds = YES;
    self.avatorImg.layer.cornerRadius = 15;
    [self.contentView addSubview:self.avatorImg];
    [self.avatorImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-36);
        make.centerY.offset(0);
        make.width.height.mas_equalTo(30);
    }];
    
    UIImageView *img = [[UIImageView alloc] init];
    img.image = [UIImage imageNamed:@"右"];
    [self.contentView addSubview:img];
    [img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-20);
        make.width.mas_equalTo(8);
        make.height.mas_equalTo(12);
        make.centerY.offset(0);
    }];
    
    UIView *lineView = [UIView new];
    lineView.backgroundColor = RGB_VALUE(0xDBDBDB);
    [self.contentView addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(22);
        make.right.offset(-22);
        make.height.mas_equalTo(1);
        make.bottom.offset(0);
    }];
}

@end
